package com.njtoyo.taxi.admin.mapper.master.mapper;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.njtoyo.taxi.admin.library.Const;
import com.njtoyo.taxi.admin.mapper.master.entity.User;
import com.njtoyo.taxi.admin.rest.export.customer.CustomerPushTokenData;
import com.njtoyo.taxi.admin.rest.export.customer.NoResponseCustomerMobileNumberPresenter;
import com.njtoyo.taxi.admin.rest.presenter.customer.CustomerListPresenter;
import com.njtoyo.taxi.admin.rest.presenter.marketing.coupon.CouponCustomerCantonPresenter;
import com.njtoyo.taxi.admin.rest.presenter.platfrom.DataAuthSqlWhere;
import com.njtoyo.taxi.admin.rest.wrapper.business.call.NoResponseCustomerMobileNumberExportDto;
import com.njtoyo.taxi.admin.rest.wrapper.business.customer.CustomerQueryWrapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author Dell
 * @since 2021-08-01
 */
@Repository
@DS(Const.PRIMARY_DS)
public interface UserMapper extends BaseMapper<User> {

    Long getAllCount(@Param("cantonIds") List<Long> cantonIds);

    List<CouponCustomerCantonPresenter> getUserAndCantonForCoupon(@Param("userIds") List<Long> userIds);

    Page<CustomerListPresenter> getList(CustomerQueryWrapper listPresenter);

    List<CustomerPushTokenData> getPushTokenByIds(@Param("ids") List<Long> ids, @Param("dataAuthSql") DataAuthSqlWhere dataAuthSqlWhere);

    List<NoResponseCustomerMobileNumberPresenter> getNoResponseCustomerMobileNumber(NoResponseCustomerMobileNumberExportDto wrapper);

    Long countNoResponseCustomerMobileNumber(NoResponseCustomerMobileNumberExportDto wrapper);

    List<User> selectListByDataAuth(@Param("ew") QueryWrapper<User> wrapper,@Param("dataAuthSql") DataAuthSqlWhere dataAuthSql);
}
